package com.hz.house.enums;

public enum ResultCodeEnum {
		
	    OK(200, "请求成功"),
	    SERVICE_ERROR(300,"业务错误"),
	    UNAUTHORIZED(401, "授权失败"),
	    SERVER_INTERNAL_ERROR(500, "服务异常, 请稍后再试");

	    private int code;
	    private String message;

	    ResultCodeEnum(int code, String message) {
	        this.code = code;
	        this.message = message;
	    }

	    public int code() {
	        return this.code;
	    }
	    public String message() {
	        return this.message;
	    }
	    public void setMessage(String msg) {
	        this.message = msg;
	        this.code = 400;
	    }
}
